package cn.taketoday.live;

import com.fasterxml.jackson.annotation.JsonIgnore;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @author TODAY
 * @date 2020/9/10 11:37
 */
@Getter
@Setter
@AllArgsConstructor
public class ValidationError implements Result {

  private Object validation;

  public static ValidationError failed(Object validation) {
    return new ValidationError(validation);
  }

  @Override
  @JsonIgnore
  public Object getData() {
    return validation;
  }
}
